#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long LL;
const long long INF = 1e18;
int n, k;
int main()
{
	while (scanf_s("%d%d", &n, &k) != EOF) {
		k = min(k, n - k);
		long double sum = 1;
		for (int i = 1; i <= k; i++) {
			sum = sum * (n - i - 1) / i;
			if (sum > INF) {
				break;
			}
		}
		if (sum > INF) {
			cout << INF << endl;
		}
		else { 
			cout <<(LL) sum << endl;
		}
	}
	return 0;
}